<template>
	<view class="flex-col page">
		<view class="flex-col justify-start flex-auto group">
			<view class="flex-col section_3 space-y-37 font_2" v-html="data.content.intro"></view>
		</view>
	</view>
</template>

<script setup>
	import {
		onLoad,
		onShow,
		onReachBottom,
		onShareAppMessage,
		onShareTimeline
	} from "@dcloudio/uni-app";
	import {
		ref,
		reactive,
		nextTick,
		watch,
		onBeforeUnmount,
		getCurrentInstance
	} from "vue"
	const {
		proxy
	} = getCurrentInstance()
	let interval
	const music = uni.createInnerAudioContext();
	onLoad((option) => {
		console.log(option);
		data.value.shop_id = option.shop_id
		// if (!uni.getStorageSync('member_id')) {
		// 	uni.navigateTo({
		// 		url: '/pages/login/login'
		// 	})
		// }
		getDate()
	})
	let data = ref({
		shop_id: '',
		content: {
			avatar: '',
			line: 40,
			shoplist: [{
				province_name: "",
				city_name: "",
				district_name: "",
				address: "",
				distance: ""
			}],
			enterprise_info: {},
			alert: [{
				abs_url: ''
			}]
		},
	})

	const getDate = () => {
		proxy.$req.requestPOST(proxy.$api.ShopInfo.getDetail, {
			member_id: uni.getStorageSync('member_id') || '',
			shop_id: data.value.shop_id,
		}).then(res => {
			data.value.content = res.data
			if (res.flag == "success") {

			}
		})
	}
</script>

<style scoped lang="scss">
	.page {
		background-color: #ffffff;
		width: 100%;
		overflow-y: auto;
		overflow-x: hidden;
		height: 100%;

		.group {
			padding-bottom: 108rpx;
			overflow-y: auto;

			.section_3 {
				padding: 51rpx 20rpx 69rpx 30rpx;
				background-color: #ffffff;

				.font_2 {
					font-size: 28rpx;
					font-family: PingFang SC;
					line-height: 48rpx;
					color: #666666;
				}

				
			}

			.space-y-37 {

				&>view:not(:first-child),
				&>text:not(:first-child),
				&>image:not(:first-child) {
					margin-top: 37rpx;
				}
			}
		}
	}
</style>